#include <windows.h>
#include "..\helpers.h"
#include "..\FRONTEND.H"


int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
	// search for Winamp main window
	HWND hwndWinAmp=FindWindow("Winamp v1.x", NULL);
	if(!hwndWinAmp)
	{
		MessageBeep(MB_ICONERROR);
		return 1;	// player is not running!
	}

	// volume down!
	PostMessage(hwndWinAmp, WM_COMMAND, WINAMP_VOLUMEDOWN, 0);

	return 0;
}